package com.jieshuibao.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.jieshuibao.model.db.Answer;
import com.jieshuibao.model.db.AnswerExample;
import com.jieshuibao.model.db.AnswerUser;
import com.jieshuibao.model.db.QuestionEx;
import com.jieshuibao.model.db.QuestionExample;
import com.jieshuibao.model.db.User;
import com.jieshuibao.model.domain.PagePhone;

public interface AnswerUserMapper {
	
	public List<AnswerUser> selectAnswerUserByExample(AnswerExample example);
	//根据问题的id 和答案的状态查询 答案
	public List<Answer> selectAnswerApproveNum(@Param(value="QUuid")String QUuid,@Param(value="status")int status);
	//根据问题的uuid和用户的账号查找答案的状态
	public Answer selectStatusByIdAndPhoneNum(@Param(value="QUuid")String QUuid,@Param(value="phoneNum")String phoneNum);
	//偷偷看详情
	public List<AnswerUser> selectAnswerUserByQUid(@Param(value="QUuid")String QUuid);
	//咨询师回答悬赏问题的详情 
	public List<AnswerUser> selectAnswerUserByPhoneAndQUuid(@Param(value="phoneNum")String phoneNum,@Param(value="QUuid")String QUuid);
	
	//是否有未提交的抢答
	public List<Answer> selectAnswrsByPhone(@Param(value="phoneNum")String phoneNum);
	//我提问的问题详情
	public List<AnswerUser> selectAnswerUserByQuestionUuid(PagePhone pagePhone);
	// 未被采纳的 人的信息
	public List<User> selectUserByQuestionUuid(@Param(value="id")String id);
	
	//根据duty  id  多个以逗号隔开 
	public String selectDutyName(@Param(value="dutyname")String dutyname);
	//修改答案的点赞 
	public void updateByPrimaryKeySelective(Answer record);
	
	public List<QuestionEx> selectUserAnswerAdopts(@Param(value="answerExample")AnswerExample answerExample,@Param(value="questionExample")QuestionExample questionExample);
	//查看未采纳的答案
	public List<Answer> selectAnswerIsAdop(String uuid);
}
